<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <link rel="icon" type="image/svg+xml" href="/zl.ico" />
        <meta name="viewport" content="width=device-width, initial-scale=1.0" />
        <title>郑洛高速超融合四维地图</title>
        <style>
            * {
                margin: 0;
                padding: 0;
            }

            html,
            body {
                width: 100%;
                height: 100%;
                background-color: #f1f1f1;
            }

            ::-webkit-scrollbar {
                width: 8px;
                height: 8px;
            }

            ::-webkit-scrollbar-button:vertical {
                display: none;
            }

            input:-webkit-autofill {
                -webkit-box-shadow: 0 0 0 1000px white inset !important;
            }
            #app {
                background-color: #fff;
            }
        </style>
        <script src="./data/mapgsname.js"></script>
        <script>
            var layerMapdata = {
                satellite:
                    "http://wx.henangis.com/map.aspx?T=JG&Z={z}&Y={y}&X={x}", //卫星
                construction: "http://zl.yugaosu.com/xyz/{z}/{x}/{y}.png", //施工
                electron:
                    "http://gis.henangis.com/mktxyz.aspx?T=zlgs&z={z}&x={x}&y={y}",//电子
                grid: "http://zl.yugaosu.com/qgxyz/{z}/{x}/{y}.png",
            };
            var unmannedDrone = [
        {
            createTime: "2022-12-22T11:10:25.000+00:00",
            endCreateTime: null,
            endMaptime: null,
            id: 19,
            idx: 99,
            type: 1022,
            alpha: 100,
            name: "许信",
            url: "http://dt.yugaosu.com/zhumadian/驻马店无人机地图/OUTPUT_DIRECTORY/{z}/{x}/{y}.png",
            uuid: "03c61b705f4e11eda4adfa163ed00158",
        },
        {
            createTime: "2022-12-07T10:28:05.000+00:00",
            id: 1,
            idx: 99,
            type: 1023,
            alpha: 100,
            name: "淮固",
            url: "http://dt.yugaosu.com/huaigu/map/{z}/{x}/{y}.png",
            uuid: "3aa46c3a4dec11eda4adfa163ed00157",
        },
    ];
        </script>
    </head>
    <body>
        <div id="app"></div>
        <script type="module" src="/src/main.js"></script>
    </body>
    <script>
        (function (win) {
            // 获取页面所有的 <script > 标签对象
            let scripts = document.getElementsByTagName("script");
            // 遍历标签
            for (let i = 0; i < scripts.length; i++) {
                // 提取单个<script > 标签对象
                let script = scripts[i];
                // 获取标签中的 src
                let url = script.getAttribute("src");
                // 获取标签中的 type
                let type = script.getAttribute("type");
                // 获取标签中的js代码
                let scriptText = script.innerHTML;
                // 如果有引用地址或者 type 属性 为 "module" 则代表该标签需要更改
                if (url || type === "module") {
                    // 创建一个新的标签对象
                    let tag = document.createElement("script");
                    // 设置src的引入
                    tag.setAttribute("url", url);
                    // 设置js代码
                    tag.innerHTML = scriptText;
                    // 删除原先的标签
                    script.remove();
                    // 将标签添加到代码中
                    document.getElementsByTagName("head")[0].appendChild(tag);
                }
            }
        })(window);
    </script>
</html>
